import $api from './index'

// 定义data的属性类型
interface companyData {
  name: string
  isVue: number
  isReact: number
  skill?: string
  areaid: string
  desc?: string
}
// 封装一个全局接口地址
export const addCompany = async (data: companyData) => {
  const rss = await $api.post('/work', data)
  return rss.data
  // 通过async异步方法，使其每次返回的都是提交数据结果的data
}
export const getCompany = async (data) => {
  const rss = await $api.get('/work')
  return rss.data
}
